#!/bin/bash
# 123 后面 加不加 / 在展示的时候是有区别的
find ~/123 -type f -name "*.txt" > ./5.txt.list

for f in `cat 5.txt.list`
do
    mv $f $f.bak
done

FIREDIR=`date +%Y-%m-%d-%H:%M:%S`
mkdir -p 123_$FIREDIR
for f in `cat 5.txt.list`
do
    cp $f.bak 123_$FIREDIR/
done
tar zcf 123.tar.gz 123_$FIREDIR

for f in `cat 5.txt.list`
do
    mv $f.bak $f
done